home *** CD-ROM | disk | FTP | other *** search
/ Super PC 31 / Super PC 31 (Shareware).iso / spc / inter / speakf / fuente / netfone.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-22  |  1.8 KB  |  70 lines

  1. /*
  2.  
  3.                 Main program
  4.                 
  5. */
  6.  
  7. #include "netfone.h"
  8.  
  9. //    WINMAIN  --  Main application entry point
  10.  
  11. INT PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrev,
  12.                    LPSTR pszCmdLine, INT nCmdShow)
  13. {
  14.     MSG msg;
  15.     LPSTR cp;
  16.     
  17.     /*    Allocate a large message queue to handle getting behind in
  18.         output buffer disposal.  */
  19.         
  20.     while (SetMessageQueue(messageQueueSize) == 0) {
  21.         messageQueueSize--;
  22.     }
  23.     
  24.     //    Disable floating point error interrupts
  25.     
  26.     _control87(_EM_ZERODIVIDE | _EM_OVERFLOW | _EM_INVALID,
  27.                _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_INVALID);
  28.     
  29.     //    Check for and process "start iconic" command line switch
  30.     
  31.     if ((cp = _fstrstr(pszCmdLine, "-S")) != NULL ||
  32.         (cp = _fstrstr(pszCmdLine, "/S")) != NULL ||
  33.         (cp = _fstrstr(pszCmdLine, "-s")) != NULL ||
  34.         (cp = _fstrstr(pszCmdLine, "/s")) != NULL) {
  35.         if ((cp == pszCmdLine || isspace(cp[-1])) &&
  36.             (cp[2] == 0 || isspace(cp[2]))) {
  37.             nCmdShow = SW_SHOWMINIMIZED;
  38.             _fmemcpy(cp, "  ", 2);
  39.         }
  40.     } 
  41.     
  42.     //    Initialise application
  43.  
  44.     if (!InitApplication(hInstance)) {
  45.         return FALSE;
  46.     }
  47.     
  48.     //    Initialise instance
  49.  
  50.     if (!InitInstance(hInstance, pszCmdLine, nCmdShow)) {
  51.         return FALSE;
  52.     }
  53.  
  54.     //    MDI message dispatching loop
  55.  
  56.     while (GetMessage(&msg, 0, 0, 0)) {
  57.         if (!((hDlgPropeller != NULL && IsDialogMessage(hDlgPropeller, &msg)) ||
  58.             (hDlgAnswer != NULL && IsDialogMessage(hDlgAnswer, &msg)))
  59.             ) {
  60.             if (!TranslateMDISysAccel(hwndMDIClient, &msg) &&
  61.                 !TranslateAccelerator(hwndMDIFrame, hAccel, &msg)) {
  62.                 TranslateMessage(&msg);
  63.                 DispatchMessage(&msg);
  64.             }
  65.         }
  66.     }
  67.     return msg.wParam;
  68. }
  69.  
  70.